﻿package Classes.Enemies.Aero{
	import flash.events.Event;	
	
	import Classes.Elements.*;
	import Classes.Utils.*;
	import Classes.Weapons.*;
	import Classes.Weapons.Bullets.*;
	
	public class Buffalo extends Aircraft{
		public function Buffalo(){			
			speed = 4;
			life = 5;
			hp = 5;
			execution = 10;
			fireable = true;
			weaponType = WeaponType.FlakBullet;
			score = UnitType.Buffalo.score;
		}		
		override protected function move():void{
			inc++;
			if(fireable){
				fire();
			}
			super.move();
		}
		
		override public function fire():void{
			if(inc % (weaponType.interval*.7) == 0){
				var fb:FlakBullet = new FlakBullet();
				fb.aTargets = this.aTargets;
				fb.angle = 180;
				fb.sender = this;
				fb.x = this.x;
				fb.y = this.y;
				bulletLayer.addChild(fb);				
			}
		}
	}
}